<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.thymeleaf.org/extras/dialect"
      layout:decorate="layout/layout_login"
>
<head>
    <meta https-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta https-equiv="X-UA-Compatible" content="IE=edge">
    <title>登录</title>
    <meta charset="utf-8"/>
    <link rel="stylesheet" href="../../static/asset/css/base.min.css" th:href="@{/asset/css/base.min.css}"/>
    <link rel="stylesheet" href="../../static/asset/css/common/front.css" th:href="@{/asset/css/common/front.css}"/>
    <link rel="stylesheet" href="../../static/asset/css/back/login.css" th:href="@{/asset/css/back/login.css}"/>
</head>
<body>
<div layout:fragment="content" class="wrapper login-wrapper">
    <div class="login-container ">
        <form th:action="@{/login}" method="post" class="login-form ">
            <div class="text-center mb-5">
                <img alt="image" style="max-height:200px; max-width: 200px;"
                     src="../static/asset/img/~default_ClientSystem_logo.png" th:src="@{${clientLogo}}"/>
                <!--<span class="client-name text-center mb-5" style="display: block" th:text="${clientName}">TMT用户中心</span>-->
            </div>

            <div class="logo-name">用户登录</div>

            <div class="alert alert-danger" th:if="${!#strings.isEmpty(errorMsg)}">
                <i class="fa fa-times-circle"></i>
                <th:block th:text="${errorMsg}">-</th:block>
            </div>
            <div class="alert alert-info" th:if="${param.logout}">
                <i class="fa fa-info-circle"></i>
                <th:block th:text="#{user.login.loggedOut}">You have been logged out.</th:block>
            </div>
            <div class="alert alert-info" th:if="${param.register}">
                <i class="fa fa-info-circle"></i>
                <th:block>注册成功！您可以使用刚注册的账号登录了。</th:block>
            </div>
            <div class="alert alert-danger" th:if="${param.invalid}">
                <i class="fa fa-times-circle"></i>
                <th:block>当前会话已失效，请重新登录</th:block>
            </div>
            <div class="alert alert-danger" th:if="${param.expired}">
                <i class="fa fa-times-circle"></i>
                <th:block>该帐号已登录，请先退出后重试</th:block>
            </div>

            <div class="form-group">
                <input name="username" type="text" class="form-control" placeholder="账号"
                       th:placeholder="#{user.info.username}">
            </div>
            <div class="form-group">
                <input name="password" type="password" class="form-control" placeholder="密码"
                       th:placeholder="#{user.info.password}">
            </div>

            <!--<div class="form-check">-->
            <!--<label class="custom-control custom-checkbox">-->
            <!--<input type="checkbox" class="custom-control-input">-->
            <!--<span class="custom-control-indicator"></span>-->
            <!--<span class="custom-control-description" th:text="#{user.login.remember}">记住我</span>-->
            <!--</label>-->
            <!--</div>-->

            <div class="form-group">
                <input type="submit" class="btn btn-block btn-primary" value="登录" th:value="#{user.login}">
            </div>


            <div class="text-right">
                <a href="#" th:href="@{/forgot}">忘记密码</a>
                <a href="#" th:href="@{/register}"
                   class="border border-primary border-bottom-0 border-top-0 border-right-0 pl-2 ml-1">注册新账号</a>
            </div>
        </form>
    </div>
</div>

<th:block layout:fragment="script">
    <script type="text/javascript" src="../../static/asset/js/base.min.js" th:src="@{/asset/js/base.min.js}"></script>
    <script type="text/javascript" src="../../static/asset/js/app.js" th:src="@{/asset/js/app.js}"></script>
</th:block>
</body>
</html>
